//
//  LottieController.m
//  Objc进阶Demo
//
//  Created by Don't update on 2018/8/21.
//  Copyright © 2018年 Don't update. All rights reserved.
//

#import "LottieController.h"
#import <Lottie/Lottie.h>
@interface LottieController ()

@end

@implementation LottieController

- (void)viewDidLoad {
    [super viewDidLoad];
    LOTAnimationView *animation = [LOTAnimationView animationFromJSON:[NSDictionary dictionaryWithContentsOfFile:@"Rescourse/animation-w400-h400"]];
//    NSLog(@"%@",[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"animation-w400-h400.json" ofType:nil]]);
    [self.view addSubview: animation];
    
    [animation playWithCompletion:^(BOOL animationFinished) {
        NSLog(@"finished");
    }];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
